package com.yz.design.settlement;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.ArrayList;
import java.util.List;

/**
 * @ClassName SettlementStrategyImpl
 * @Description 项目方结算
 * @Author 广长
 * @Date 2020/7/10
 * @Version V1.0
 **/
public class ProjectSettlementStrategyImpl implements SettlementStrategy{
    private static Logger logger = LoggerFactory.getLogger("logs");

    @Override
    public SettlementContext saveDraft(SettlementContext context) {
        logger.debug("保存草稿成功");
        return context;
    }

    @Override
    public void removeDraft(SettlementContext context) {
        logger.debug("根据结算单id，删除草稿成功");
    }

    @Override
    public CitySiteSettlementContext getPayContext(SettlementContext context) {
        logger.debug("根据结算单id，获取付款城市站上下文");
        return new CitySiteSettlementContext(1,"1",new DealCitySiteSettlementServiceImpl());
    }

    @Override
    public CitySiteSettlementContext getReceiveContext(SettlementContext context) {
        logger.debug("根据结算单id，获取收款城市站上下文");
        return new CitySiteSettlementContext(2,"2",new ProjectCitySiteSettlementServiceImpl());
    }

    @Override
    public List<Object> getSettlementDetailedList(SettlementContext context) {
        logger.debug("根据结算单id，获取已保存结算明细");
        return new ArrayList<>();
    }
}
